<!DOCTYPE html>
<!--
==========================================================================
云捷GO自动生成列表页面代码,只生成一次,按需修改.
生成日期：2021-08-01 08:34:56
生成路径: template/module/project/list.html
生成人：gfcms
==========================================================================
-->
<html lang="zh">
<head>
    {{template "header" (ossUrl)}}
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>    
                        <li>
                            <p>项目名称：</p>
                            <input type="text" name="name"/>
                        </li>
                            
                        <li>
                            <p>合同编号：</p>
                            <input type="text" name="number"/>
                        </li>
                                      
                        <li>
                            <p>接单时间：</p>
                            <input type="text" name="ordertime"/>
                        </li>
                            
                        <li>
                            <p>完结时间：</p>
                            <input type="text" name="overtime"/>
                        </li>
                              
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            {{getPermiButton .Session.uid "module:project:add" "$.operate.add()" "新增" "btn btn-success" "fa fa-plus"}}
            {{getPermiButton .Session.uid "module:project:edit" "$.operate.edit()" "修改" "btn btn-primary single disabled" "fa fa-edit"}}
            {{getPermiButton .Session.uid "module:project:remove" "$.operate.removeAll()" "删除" "btn btn-danger multiple disabled" "fa fa-remove"}}
            {{getPermiButton .Session.uid "module:project:export" "$.table.importExcel()" "导入" "btn btn-primary" "fa fa-download"}}
            {{getPermiButton .Session.uid "module:project:export" "$.table.exportExcel()" "导出" "btn btn-warning" "fa fa-download"}}
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
{{template "footer" (ossUrl)}}
                        
<script type="text/javascript">
    var editFlag = '{{hasPermi .Session.uid "module:project:edit"}}';
    var removeFlag = '{{hasPermi .Session.uid "module:project:remove"}}';

                            
    var prefix = ctx + "module/project";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            importUrl: prefix + "/importData",
            importTemplateUrl: prefix + "/importTemplate",
            exportUrl: prefix + "/export",
            modalName: "项目管理",
            columns: [
                {
                    checkbox: true
                },  
                {
                    field: 'id',
                    title: '',
                    visible: false
                },     
                {
                    field: 'name',
                    title: '项目名称'
                },      
                {
                    field: 'number',
                    title: '合同编号'
                },      
                {
                    field: 'type',
                    title: '项目类型'
                },      
                {
                    field: 'manager',
                    title: '商务'
                },      
                {
                    field: 'customer',
                    title: '客户'
                },      
                {
                    field: 'email',
                    title: '邮箱'
                },      
                {
                    field: 'telephone',
                    title: '电话'
                },      
                {
                    field: 'ordertime',
                    title: '接单时间'
                },      
                {
                    field: 'overtime',
                    title: '完结时间'
                },        
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }
            ]
        };
        $.table.init(options);
    });
</script>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
    <form enctype="multipart/form-data" class="mt20 mb10">
        <div class="col-xs-offset-1">
            <input type="file" id="file" name="file"/>
            <div class="mt10 pt5">
                &nbsp;	<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
            </div>
            <font color="red" class="pull-left mt10">
                提示：仅允许导入“xls”或“xlsx”格式文件！
            </font>
        </div>
    </form>
</script>
</body>
</html>